<form id="pagerForm" action="__URL__/index" method="post">
    <include file="Public/pagerForm" />
    <input type="hidden" name="pid" value="{$search['pid']}" />
    <input type="hidden" name="pidSort" value="{$search['pidSort']}" />
</form>
<style>tr td,th{text-align:center}.typestyle{padding: 2px 6px;font-size: 13px;color: #fff;border-radius: 4px;}</style>
<script type="text/javascript" src="__JS__/twoLinkage.js"></script>
<script type="text/javascript">
$( function() {
	var parentObj = $('select[name="pidSort"]');
        var subObj = $('select[name="secondpid"]');
	$.twoLinkage( parentObj, subObj );
        
        var parentObj = $('select[name="secondpid"]');
        var subObj = $('select[name="pid"]');
	$.twoLinkage( parentObj, subObj );
} );
</script>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="__URL__/index" method="post">
    <div class="searchBar">
        <ul class="searchContent">
			<li>广告名称：<input type="text" name="adname" value="{$search['adname']}" /></li>
            <li>
                <label>类型：</label>
                <select name="type" class="required">
                    <option value="0">请选择</option>
                    <option value="2" <if condition="2 == $search['type']">  selected = "selected" </if> >社会责任</option>
					<option value="3" <if condition="3 == $search['type']">  selected = "selected" </if> >员工风采</option>
                </select>
			</li>
			<li>
                <label>是否显示：</label>			
                <select name="is_show" class="required">
                    <option value="">请选择</option>
                    <option value="1" <if condition="1 == $search['is_show']">  selected = "selected" </if> >显示</option>
					<option value="2" <if condition="2 == $search['is_show']">  selected = "selected" </if> >隐藏</option>
                </select>
			</li>
        </ul>
        <div class="subBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
            </ul>
        </div>
    </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li>
                <a href="__URL__/add" class="add" rel="add" target="dialog"  title="添加">
                    <span>添加</span>
                </a>
            </li>      
			<li class="line">line</li>
			<li>
                <a class="audit" href="__URL__/check/status/yes" target="selectedTodo" rel="id" posttype="string" title="你确定要批量审核显示吗？">
                	<i class="iconfont">&#xe62c;</i>
                    <span>显示</span>
                </a>
            </li>
			<li class="line">line</li>
			<li>
                <a class="edit" href="__URL__/check/status/no" target="selectedTodo" rel="id" posttype="string" title="你确定要批量审核隐藏吗？">
                	<i class="iconfont">&#xe62c;</i>
                    <span>隐藏</span>
                </a>
            </li>
			<li class="line">line</li>
            <li>
                <a class="delete" href="__URL__/remove" target="selectedTodo" rel="id" posttype="string" title="你确定要批量删除吗？">
                    <span>删除</span>
                </a>
            </li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="206">
        <thead>
        <tr>
            <th width="2%"><input type="checkbox" group="id" class="checkboxCtrl" ></th>
            <th width="3%">编号</th>
            <th width="10%">图片名称</th>
            <th width="16%">缩略图</th>
            <th width="10%">广告类型</th>
			<th width="10%">跳转地址</th>  
			<th width="10%">排序</th>
			<th width="10%">是否显示</th>
            <th width="10%">创建时间</th>
            <th width="5%">操作</th>
        </tr>
        </thead>
        <tbody>
        <if condition="$dataList|count gt 0">
            <volist name="dataList" id="volist" key="k">
                <tr target="sid_user" rel="{$volist['id']}" >
                    <td><input name="id" value="{$volist['id']}" type="checkbox"></td>
                    <td>{:( $page['pageNum'] - 1 ) * $page['numPerPage'] + $k}</td>
                    <td>{$volist['name']}</td>
					<td>
                        <if condition="$volist['img_url'] eq ''">
                            <img src="__IMAGES__/nopic.jpg" height="70" width="100" alt="" />
                            <else />
                            <a href="__ROOT__{$volist['img_url']}" title="{$volist['img_url']}" target="_blank" rel="example_group">
                                <img src="__ROOT__{$volist['img_url']}" height="70" width="100" alt="{$volist['img_url']}" />
                            </a>
                        </if>
                    </td>
					<td>
						<if condition="$volist['type'] eq 2">
							<span class="typestyle" style="line-height:60px;background-color:#8B7500;">社会责任</span>
	                    <else />
	                    	<span class="typestyle" style="line-height:60px;background-color:#5F9EA0;">员工风采</span>
	                    </if>
					</td>
					<td>{$volist['url']}</td>
					<td>{$volist['sort']}</td>
					<td>
						<if condition="$volist['is_show'] eq 0">
							<span class="typestyle" style="line-height:60px;background-color:#90EE90;">显示</span>
	                    <else />
	                    	<span class="typestyle" style="line-height:60px;background-color:#EE3B3B;">隐藏</span>
	                    </if>
					</td>
                    <td>{$volist['addtime']}</td>
					<td>【<a href="__URL__/edit/id/{$volist['id']}" class="edit" style="color: #09F" target="dialog" rel="edit" >编辑</a>】</td>
                </tr>
            </volist>
        <else />
        	<tr><td colspan="10" style="text-align:center;">没有数据!!!</td></tr>
        </if>
        </tbody>
    </table>
    <include file="Public/pagination" />
</div>